package cc.zy.base.hr.mapper;

import cc.zy.base.hr.entity.Course;
import cc.zy.base.hr.entity.ExecuteSchedule;
import cc.zy.base.hr.entity.ExecuteSchedule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * ExecuteSchedule标签
 * Mapper
 * @author yan
 * @date 2021-03-05 10:51:13
 */
public interface ExecuteScheduleMapper extends BaseMapper<ExecuteSchedule> {

    /**
     * 查找月计划执行表
     * @param page 分页对象
     * @return Ipage
     */
    <T> IPage<ExecuteSchedule> findScheduleDetailPage(Page<T> page,
                                                      @Param("executeSchedule") ExecuteSchedule executeSchedule);

    /**
     * 计算总数
     * @return
     */
    long executeScheduleCount();

    /**
     * 通过ID查找详细信息
     * @param id
     * @return
     */
    ExecuteSchedule findById(Integer id);

    /**
     * 删除
     * @param id
     */
    void deleteExecuteSchedule(int id);

    /**
     * 查询所有课程名称
     * @return
     */
    List<Course> queryCourseName();

    /**
     * 只修改ExecuteSchedule PlanDate
     * @param executeSchedule
     */
    void updatePlanDate(@Param("executeSchedule") ExecuteSchedule executeSchedule);

    /**
     * 查询不分页 excel
     * @param executeSchedule
     * @return
     */
    List<ExecuteSchedule> findExecuteScheduleListNotPage(@Param("executeSchedule") ExecuteSchedule executeSchedule);
}